package tut.topic.synchronizedKeyword.sync_this.after;

class Account {
	private int balance = 0; // 預金残高

	public void deposit(int money) {
		synchronized(this){
			int total = balance + money;
			balance = total;
		}
	}
}